<template>
    <view class="purchase-pro-item">
        <easy-pro-image customSize="160" :url="easyGetImgUrl(item.V_ProductImg)"></easy-pro-image>
        <view class="pro-info">
            <text class="pro-name">{{ item.V_ProductName }}</text>
            <view class="pro-desc">
                <text>规格：{{ item.V_AttributeNameValue ? item.V_AttributeNameValue : "" }}</text>
                <text>单位：{{ item.UnitName }}</text>
            </view>
            <view class="pro-num">
                <text>{{ isWait ? "待" : "已" }}入库：</text
                ><text class="text-num">{{ item.Amount }}{{ item.UnitName }}</text>
            </view>
        </view>
    </view>
</template>

<script>
import easyLabelValue from "@/components/easy/easy-label-value.vue"
import easyProImage from "@/components/easy/easy-pro-image.vue"
export default {
    components: {
        easyLabelValue,
        easyProImage,
    },
    props: {
        item: {
            type: Object,
            default: () => {},
        },
        isWait: {
            type: Boolean,
            default: false,
        },
    },
    data() {
        return {}
    },
    mounted() {
        this.item.ActualAmount = this.item.Amount
        this.$forceUpdate()
    },
    onShow() {},
    methods: {},
}
</script>

<style lang="scss">
.purchase-pro-item {
    display: flex;
    flex-direction: row;
    background: $color-white;
    margin-bottom: $app-page-padding;
    .pro-img {
        width: 120rpx;
        height: 120rpx;
    }
}
.pro-info {
    .pro-name {
        display: flex;
        font-size: $font-size-26;
        font-weight: bold;
        margin-bottom: 10rpx;
    }
    .pro-desc {
        display: flex;
        flex-direction: column;
        text {
            font-size: $font-size-26;
            margin-bottom: 6rpx;
            color: $app-color-text-tip;
        }
    }
    .pro-num {
        display: flex;
        flex-direction: row;
        align-items: center;
        margin-top: 4rpx;
        text {
            font-size: $font-size-26;
            margin-right: 8rpx;
        }
        .text-num {
            color: $color-red;
        }
    }
}
</style>
